package BigTest;

import java.io.*;
import java.util.ArrayList;
import java.util.Collections;

public class test03 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("allname.txt"));
        ArrayList<String> list = new ArrayList<>();
        BufferedReader list2 = new BufferedReader(new FileReader("count2.txt"));
        String s;
        while ((s = br.readLine()) != null){
            list.add(s);
        }
        br.close();
        int count = Integer.parseInt(list2.readLine());
        list2.close();
        count++;
        System.out.println(count);
        if(count != 3){
            Collections.shuffle(list);
            String s1 = list.get(0);
            System.out.println(s1.split("-")[0]);
        }else {
            System.out.println("张三");
        }
        BufferedWriter bw = new BufferedWriter(new FileWriter("count2.txt"));
        bw.write(count + "");
        bw.close();
    }
}
